﻿using System.ComponentModel.DataAnnotations;
using ProductCollector;

namespace ThemeCupid.FrontEnd.Model
{
    public class CartItem
    {
        [Key]
        public string ItemId { get; set; }

        public string CartId { get; set; }

        public int Quantity { get; set; }
        public float TotalPrice { get { return Product == null ? 0 : Quantity * Product.Price; } }
        public System.DateTime DateCreated { get; set; }
        public string ProductId { get; set; }
        public Product Product { get; set; }
    }
}